<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
        <title></title>
        <link rel="stylesheet" href="__PUBLIC__/apps/css/font-awesome.min.css">
        <link rel="stylesheet" href="__PUBLIC__/apps/css/swiper-3.4.2.min.css">
        <link rel="stylesheet" href="__PUBLIC__/apps/css/reset.css">
        <link rel="stylesheet" href="__PUBLIC__/apps/css/index.css" />
        <script src="__PUBLIC__/apps/js/jquery-3.1.1.min.js"></script>
        <script src="__PUBLIC__/apps/js/swiper-3.4.2.jquery.min.js"></script>
        <script>
            !function (e, t) { function i() { var t = r.getBoundingClientRect().width; (function () { for (var e = navigator.userAgent, t = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"), i = !0, a = 0; a < t.length; a++)if (e.indexOf(t[a]) > 0) { i = !1; break } return i })() && t < 2047 && (t = t > 540 ? 540 : t); var i = t / 7.5; r.style.fontSize = i + "px", s.rem = e.rem = i } var a, n = e.document, r = n.documentElement, o = n.querySelector('meta[name="viewport"]'), d = n.querySelector('meta[name="flexible"]'), l = 0, m = 0, s = t.flexible || (t.flexible = {}); if (o) { console.warn("将根据已有的meta标签来设置缩放比例"); var p = o.getAttribute("content").match(/initial\-scale=([\d\.]+)/); p && (m = parseFloat(p[1]), l = parseInt(1 / m)) } else if (d) { var c = d.getAttribute("content"); if (c) { var u = c.match(/initial\-dpr=([\d\.]+)/), f = c.match(/maximum\-dpr=([\d\.]+)/); u && (l = parseFloat(u[1]), m = parseFloat((1 / l).toFixed(2))), f && (l = parseFloat(f[1]), m = parseFloat((1 / l).toFixed(2))) } } if (!l && !m) { e.navigator.appVersion.match(/android/gi); var v = e.navigator.appVersion.match(/iphone/gi), h = (e.navigator.appVersion.match(/ipad/gi), e.devicePixelRatio); m = 1 / (l = v ? h >= 3 && (!l || l >= 3) ? 3 : h >= 2 && (!l || l >= 2) ? 2 : 1 : 1) } if (r.setAttribute("data-dpr", l), !o) if ((o = n.createElement("meta")).setAttribute("name", "viewport"), o.setAttribute("content", "initial-scale=" + m + ", maximum-scale=" + m + ", minimum-scale=" + m + ", user-scalable=no"), r.firstElementChild) r.firstElementChild.appendChild(o); else { var g = n.createElement("div"); g.appendChild(o), n.write(g.innerHTML) } e.addEventListener("resize", function () { clearTimeout(a), a = setTimeout(i, 300) }, !1), e.addEventListener("pageshow", function (e) { e.persisted && (clearTimeout(a), a = setTimeout(i, 300)) }, !1), "complete" === n.readyState ? n.body.style.fontSize = 14 * l + "px" : n.addEventListener("DOMContentLoaded", function (e) { n.body.style.fontSize = 14 * l + "px" }, !1), i(), s.dpr = e.dpr = l, s.refreshRem = i, s.rem2px = function (e) { var t = parseFloat(e) * this.rem; return "string" == typeof e && e.match(/rem$/) && (t += "px"), t }, s.px2rem = function (e) { var t = parseFloat(e) / this.rem; return "string" == typeof e && e.match(/px$/) && (t += "rem"), t } }(window, window.lib || (window.lib = {}))

        </script>
    </head>

    <body class="Index">
            
                    <header>
                            <a href="{:U('Index/city')}" class='city '> {$data}<i class="fa fa-angle-down"></i>    </a>
                            <h1 class='title'>金蚂蚁装修网</h1>
                            <a href="" class='kefu'> <i class="fa fa-whatsapp" aria-hidden="true"></i> </a>
                    </header>
                    <div class="swiper-container">
                        <div class="swiper-wrapper">
                            <div class="swiper-slide"><img src="__PUBLIC__/apps/img/banner0.jpg" alt=""></div>
                            <div class="swiper-slide"><img src="__PUBLIC__/apps/img/banner1.jpg" alt=""></div>
                            <div class="swiper-slide"><img src="__PUBLIC__/apps/img/banner2.jpg" alt=""></div>
                        </div>
                    </div>
                    <div class="module-con topNav">
    <ul class="mui-flex">
    <foreach name="tarr" item="v">
        <li>
            <a href="{:U($v['action'])}">
                <img src="__PUBLIC__/apps/img/{$v.imagename}" >
                <span>{$v.name}</span>
            </a>
        </li>
    </foreach>
    </ul>
    <ul class="mui-flex">
     <foreach name="darr" item="v">
        <li>
            <a href="{:U($v['action'])}">
                <img src="__PUBLIC__/apps/img/{$v.imagename}">
                <span>{$v.name}</span>
            </a>
        </li>
    </foreach>
    </ul>
</div>
                    <div class="home-bidding clearfix">
                        <a href="{:U('Liucheng/index')}" class="one">
                            <img src="__PUBLIC__/apps/img/index_one.jpg" alt="">
                        </a>
                        <a href="" class="two">
                            <img src="__PUBLIC__/apps/img/index_two.jpg" alt="">
                        </a>
                        <a href="" class="three">
                            <img src="__PUBLIC__/apps/img/index_three.jpg" alt="">
                        </a>

                    </div>      
                    <div class="price">
                            <h2>十秒估算装修报价</h2>
                            <p>今天已有<b>xxxx</b>人获取报价</p>
                            <div class="contal">
                                <i class="fa city_icon"></i>
                                <input type="text" id="expressArea" placeholder="请选择您的所在城市" class="address" name="city"/>
                                <i class="fa fa-angle-right "></i>
                            </div>
                            <div class="contal">
                                <i class="fa area_icon "></i>
                                <input type="num" id="area" placeholder="请输入您的住房面积" class="area" />
                                <i class="fa"> ㎡</i>
                            </div>
                            <div class="contal">
                                <i class="fa house_icon"></i>
                                <input type="text" id="peizhi" placeholder="请选择您的户型" class="house" />
                                <i class="fa fa-angle-right "></i>
                            </div>
                            <div class="contal">
                                <i class="fa phone_icon "></i>
                                <input type="text" id="phone" placeholder="请输入您的手机号码" class="phone" />

                            </div>
                            <button id="jisuan">立即计算</button>
                    </div>
                    <script>
                    $('#jisuan').click(function () {
                        var house=$("#peizhi").val();
                        var city=$("#expressArea").val();
                        var mobile=$("#phone").val();
                        var area=$("#area").val();
                        if(city == ''){
                            alert('请选择您的所在城市！')
                            return false;
                        }else if(!mobile.match(/^1[0-9]{10}$/)){
                            alert('请输入正确的手机号码！')
                            return false;
                        }else if(area == ''){
                            alert('请输入您的房屋面积！')
                            return false;
                        }else if(house == ''){
                            alert('请输入您的户型！')
                            return false;
                        }
                        $.ajax({
                              type: 'POST',
                              url: '{:U("Mobile/Baojia/add")}',
                              data: {
                                house:house,
                                city:city,
                                mobile:mobile,
                                area:area
                              },
                              dataType: 'json',
                              success: function(data){
                                if(data.msg==1){
                                    alert("计算成功,稍后以短信形式发送给您,请注意查收!")
                                    window.location.reload();
                                }
                              },
                            });
                        })
                    </script>
                   <div class="design">
                         <div class="title">
                                <h2> 看设计</h2>
                                <span>See the design</span>
                                
                         </div>
                        <ul class="style_nav clearfix">
                            <li class="on">
                                <p>风格</p>
                                <span></span>
                            </li>
                            <li>
                                <p>户型</p>
                                <span></span>
                            </li>
                        </ul>
                        <div class="content">
                            <div class="style">
                                <ul>
                                <foreach name="sarr" item="v">
                                    <li>
                                        <a href="{:U($v['action'])}">
                                            <img src="__PUBLIC__/apps/img/{$v.imagename}" alt="">
                                            <p> {$v.name}</p>
                                            <b></b>
                                            <span>{$v.en}</span>
                                        </a>
                                    </li>
                                </foreach>
                                </ul>
                                <a href="{:U('Image/list')}" class="more">查看更多></a>
                            </div>

                            <div class="huxing">
                                <ul>
                                <foreach name="harr" item="v">
                                    <li>
                                        <a href="{:U($v['action'])}">
                                            <img src="__PUBLIC__/apps/img/{$v.imagename}" alt="">
                                            <p> {$v.name}</p>
                                            <b></b>
                                            <span>{$v.en}</span>
                                        </a>
                                    </li>
                                </foreach>
                                </ul>
                                <a href="{:U('Image/list')}" class="more">查看更多></a>
                            </div>
                        </div>
                    </div>
                    <div class="table"></div>
                    <div class="case clearfix">
                        <div class="title">
                            <h2> 经典案例</h2>
                            <span>A classic case</span>
                        </div>
                        <div class="top">
                            <a href="">
                                <div class="img">
                                    <img src="__PUBLIC__/apps/img/top.jpg" alt="">
                                </div>
                                <h3 class="type">
                                    三居室
                                </h3>
                                <p>锦江花园</p>
                                <b></b>
                                <span>美式田园 / 120㎡</span>
                            </a>
                        </div>
                        <div class="nav">
                            <ul>
                                <foreach name="dearr" item="v">
                                <li>
                                    <a href="{:U('Demo/detail',array('id'=>$v['id']))}">
                                        <div class="img">
                                            <img src="__PUBLIC__/apps/img/{$v.imagename}" alt="{$v.area}㎡{$v.style}{$v.comm}{$v.huxing}">
                                        </div>
                                        <h3 class="type">
                                            {$v.huxing}
                                        </h3>
                                        <p>{$v.comm}</p>
                                        
                                        <span>{$v.style} / {$v.area}㎡</span>
                                    </a>
                                </li>
                                </foreach>
                            </ul>
                        </div>
                        <a href="{:U('Demo/list')}" class="more">查看更多></a>
                    </div>  
                    <div class="table"></div>
                    <div class="company clearfix">
                        <div class="title">
                            <h2> 找装修公司</h2>
                            <span>Decorate a company</span>
                        </div>
                        <ul>
                        <foreach name="carr" item="v">
                            <li>
                                    <a href="{:U('Company/deatil',array('id'=>$v['id']))}">
                                        <div class="img">
                                            <img src="__PUBLIC__/Upload/{$v.imagename}" alt="">
                                        </div>
                                    <b></b>
                                    <p>{$v.cname}</p>
                                    <h3>公司简介</h3>
                                </a>
                            </li>
                        </foreach>
                        
                        </ul>
                            <a href="{:U('Company/list')}" class="more">寻找更多装修公司></a>
                    </div>
                    <div class="zhaobiao">
                        <h2 class="title">
                            最新业主招标
                        </h2>
                        <ul>
                        <foreach name="barr" item="v">
                            <li>
                                <p class="day"><?php echo date("m月-d日",$v['addtime'])?></p>
                                <p class="city">{$v.s_city}</p>
                                <p class="xiaoqu">{$v.comm}</p>
                                <p class="area">{$v.area}㎡</p>
                                <p class="much">￥{$v.price}万</p>
                            </li>
                        </foreach>
                        </ul>
                    </div>
                        <div class="table"></div>
                        <div class="learn">
                                <div class="title">
                                    <h2>学装修</h2>
                                    <span>Learn decoration</span>
                                
                                
                                </div>
                                <ul class="style_nav clearfix">
                                    <li class="on">
                                        <p>装修百科</p>
                                        <span></span>
                                    </li>
                                    <li>
                                        <p>装修问答</p>
                                        <span></span>
                                    </li>
                                </ul>
                                <div class="content">
                                    <div class="baike">
                                        <ul class="clearfix">
                                        <foreach name="baike" item="v">
                                            <li>
                                                <a href="{:U('Zxbk/deatil',array('id'=>$v['id']))}">
                                                    <div class="img">
                                                        <img src="__PUBLIC__/Upload/{$v.imagename}" alt="">
                                                    </div>
                                                    <div class="right">
                                                        <h2> <?php echo mb_substr($v['lname'],0,13)?>...</h2>
                                                        <p class="text"><?php echo mb_substr($v['content'],0,103)?></p>
                                                        <b></b>
                                                        <div class="bott">
                                                            <span>装修中-施工阶段-<?php $re = M("Baike");
                                                                                        $fid=$v["bid"];
                                                                                        $name = $re->where("fid=$fid")->select();
                                                                                        foreach($name as $vl){
                                                                                            echo $vl['name'];
                                                                                        }
                                                            ?></span>
                                                            <i class="fa fa-eye">{$v.viewtime}</i>
                                                        </div>
                                                    </div>
                                                </a>
                                            </li>
                                            </foreach>
                                        </ul>
                                        <a href="{:U('Zxbk/list')}" class="more">查看更多></a>
                                  </div>
                                
                                    <div class="wenda">
                                        <ul class="clearfix">
                                        <foreach name="qarr" item="v">
                                            <li>
                                                <a href="">
                                                    <h2 class="fa fa-question-circle  fa-2x">{$v.title}</h2>
                                                    <h3><?php echo date("Y-m-d",$v['addtime'])?></h3>
                                                    <p>{$v.content}</p>
                                                    <span class="ci fa fa-eye">6584</span>
                                                    <span class="huida fa fa-commenting">6584</span>
                                                </a>
                                            </li>
                                            </foreach>                              
                                        </ul>
                                        <a href="{:U('Zxwd/list')}" class="more">查看更多></a>
                                    </div>

                                </div>
                        </div>

                        <a class="yuyue">
                            
                        </a>    
                        <div class="online">
                                <i class="fa fa-mobile fa-2x"></i><input type="text" id="mobile" placeholder="请输入您的手机号码">
                                <button id="but">报价咨询</button>
                        </div>
                        <script>
                            $("#but").click(function(){
                                $.ajax({
                                      type: 'POST',
                                      url: '{:U("Mobile/Baojia/add")}',
                                      data: {
                                        phone:$("#mobile").val(),
                                      },
                                      dataType: 'json',
                                      success:function(data){
                                            if(data.msg==1){
                                                 alert("计算成功,稍后以短信形式发送给您,请注意查收!")
                                                 window.location.reload();
                                            }
                                      }

                                })
                            })
                        </script>
                        <footer>

                        </footer>
                        <!--选择地区弹层-->
                        <section id="areaLayer" class="express-area-box">
                            <header>
                                <h3>选择地区</h3>
                                <a id="backUp" class="back" href="javascript:void(0)" title="返回"></a>
                                <a id="closeArea" class="close" href="javascript:void(0)" title="关闭"></a>
                            </header>
                            <article id="areaBox">
                                <ul id="areaList" class="area-list"></ul>
                            </article>
                        </section>
                        
                        
                        
                        <section id="areaPeizhi">
                            <header>
                                <h3>选择您的户型</h3>
                        
                                <a id="closePeizhi" class="close" href="javascript:void(0)" title="关闭"></a>
                            </header>
                            <div class="article">
                                <ul>
                                    <li class="on">1室</li>
                                    <li>2室</li>
                                    <li>3室</li>
                                    <li>4室</li>
                                    <li>5室</li>
                                </ul>
                                <ul>
                                    <li class="on">1厅</li>
                                    <li>2厅</li>
                                    <li>3厅</li>
                                    <li>4厅</li>
                                    <li>5厅</li>
                                </ul>
                                <ul>
                                    <li class="on">1厨</li>
                                    <li>2厨</li>
                                    <li>3厨</li>
                                    <li>4厨</li>
                                    <li>5厨</li>
                                </ul>
                                <ul>
                                    <li class="on">1卫</li>
                                    <li>2卫</li>
                                    <li>3卫</li>
                                    <li>4卫</li>
                                    <li>5卫</li>
                                </ul>
                                <ul>
                                    <li class="on">1阳台</li>
                                    <li class="">2阳台</li>
                                    <li class="">3阳台</li>
                                    <li class="">4阳台</li>
                                    <li class="">5阳台</li>
                                </ul>
                            </div>
                            <button class="peizhi-submit">确定</button>
                        </section>
                    <div id="areaMask" class="mask" ></div>
    <script> 
    $('.style_nav').delegate('li','click',function(){
            $(this).addClass('on').siblings().removeClass('on');
            $(this).parent().siblings('.content').children().eq($(this).index()).fadeIn()
            $(this).parent().siblings('.content').children().eq($(this).index()).siblings().hide()
        })
        var mySwiper = new Swiper('.swiper-container', {
            autoplay: 3000,//可选选项，自动滑动
        })
        
    </script>
    <script src="__PUBLIC__/apps/js/jquery.area.js"></script>
    </body>

</html>